#define  _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int main(){
    int A, B = 0;
    scanf("%d %d", &A, &B);
    int n = A ^ B;
    int count = 0;
    for (int i = 0;i < 32;i++)
    {
        if (n & 1 == 1)
        {
            count++;
        }
        n >>= 1;
    }
    printf("%d\n",count);
    return 0;
}
